<div class="fm-content">
    <!-- 最上面标题栏 -->
    <div class="title">
        <i nz-icon [type]="'desktop'"></i>
        &nbsp;&nbsp;机场空防安全
    </div>
    <!-- 内容 -->
    <div class="work">

        <!-- 查询框 -->
        <div class="top">
            <!-- first-input -->
            <nz-select class="fm-input first-input" (nzOpenChange)="airportDic.load('0')"
                [(ngModel)]="fs.queryObject['airport:=']" [nzPlaceHolder]="'所属机场'">
                <nz-option *ngFor="let option of airportDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
                </nz-option>
                <nz-option *ngIf="airportDic.isLoading" nzDisabled nzCustomContent>
                    <i nz-icon type="loading" class="loading-icon"></i>加载中...
                </nz-option>
            </nz-select>
            <nz-button-group>
                <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
                <button nz-button (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
            </nz-button-group>
            <div class="tool-right">
                <nz-button-group>
                    <button *ngIf="ss.mi.sa || ss.mi.jckfaqxz" nz-button [nzType]="'primary'" (click)="editRow(null)">新增</button>
                    <!-- <button nz-button (click)="fs.editRow()">编辑</button> -->
                    <button *ngIf="ss.mi.sa || ss.mi.jckfaqsc" nz-popconfirm nzTitle="确认删除选择项?" (nzOnConfirm)="fs.delEntitys()" nzPlacement="bottomRight"
                        nz-button>删除</button>
                  <a nz-button href="assets/images/机场空防安全.xls" download="机场空防安全.xls">模板下载</a>
                  <button nz-button (click)="fs.export('xjmh_jckf.html', '机场空防安全.xls')">导出</button>
                  <nz-upload nzAction="{{ fs.getExcelUploadUrl() }}" [nzLimit]="1" [nzHeaders]="ffs.fileHeaders"
                             [nzFilter]="fs.excelFilters" [nzAccept]="'.xls,.xlsx'" (nzChange)="excelHandleChange($event)">
                    <button *ngIf="ss.mi.sa || ss.mi.jckfaqxz" nz-button>导入</button>
                  </nz-upload>
                </nz-button-group>
            </div>
        </div>

        <!-- 右则样表单主体 -->
        <div class="work-content">
            <div class="table">
                <nz-table nzSize="middle" nzBordered nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
                    [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
                    [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
                    (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
                    <thead>
                        <tr>
                            <th rowspan="3" nzShowCheckbox [(nzChecked)]="fs.allChecked"
                                [nzIndeterminate]="fs.indeterminate" (nzCheckedChange)="fs.checkAll($event)"></th>
                            <th rowspan="3" [nzAlign]="'center'">所属机场</th>
                            <th colspan="7">安全检查</th>
                            <th>空地联动</th>
                        </tr>
                        <tr>
                            <th colspan="4">旅客人身及行李检查</th>
                            <th colspan="3">货物、邮件、快件检查</th>
                            <th rowspan="2">安检报警（次）</th>
                        </tr>
                        <tr>
                            <th>检查行李（件）</th>
                            <th>易燃易爆物品（件）</th>
                            <th>枪支（含仿真枪）（件）</th>
                            <th>管制刀具（件）</th>
                            <th>检查货物、邮件、快件（件次）</th>
                            <th>伪报品名、夹带运输（起）</th>
                            <th>易燃易爆物品（件）</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr *ngFor="let data of fs.datas">
                            <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
                            </td>
                            <!-- <td><span (click)="fs.editRow(data)" class="form-edit"></span></td> -->
                            <td [nzAlign]="'center'"><span (click)="editRow(data)" class="form-edit">{{data.airportName}}</span></td>
                            <td>{{data.checkbag}}</td>
                            <td>{{data.danger}}</td>
                            <td>{{data.guns}}</td>
                            <td>{{data.controlknife}}</td>
                            <td>{{data.goodspackages}}</td>
                            <td>{{data.fakename}}</td>
                            <td>{{data.dangergoods}}</td>
                            <td>{{data.afalarm}}</td>
                        </tr>
                    </tbody>
                </nz-table>
            </div>
        </div>
    </div>
</div>
